//
//  MytextFieldCollectionViewCell.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/9.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "MytextFieldCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "MytextTableViewCell.h"
#import "MytextModel.h"
#import "mytextcontentModel.h"
@implementation MytextFieldCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self =[super initWithFrame:frame];
    if (self) {
        
        self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height) style:UITableViewStylePlain];
        self.tableView.backgroundColor =[UIColor whiteColor];
        self.tableView.rowHeight =300;
        self.tableView.delegate =self;
        self.tableView.dataSource=self;
        [self.contentView addSubview:self.tableView];
        [_tableView release];
    }
    return self;
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.onePageArr.count;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *reuse =@"reuse";
    MytextTableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:@"reuse"];
    if (!cell) {
        cell =[[[MytextTableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuse]autorelease];
        
    }
    
    MytextModel *mytext =self.onePageArr[indexPath.row];
    cell.titleLabel.text=mytext.title;
    [cell.bigImage sd_setImageWithURL:[NSURL URLWithString:mytext.imgpath]];
    cell.zhekouLabel.text =[NSString stringWithFormat:@"💰%@",mytext.price];
    mytextcontentModel *content =self.contentArr[indexPath.row];
    cell.addressLabel.text =content.merchant_name;
    
    
    return cell;
}






@end
